package com.tgpms.interfaces.properties;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author eve
 * <p>
 * 接口地址参数类
 */
public class Url {

    private final static String VFORM_IP = Properties.ip;

    private final static String PORTAL_URL = PortalProperties.url;

    private final static Logger logger = LoggerFactory.getLogger(Url.class);

    static {
        logger.info("\n -> IP: " + new Properties().ip + "\n -> new IP: " + Properties.ip);
    }

    /**
     * 解析MyDesk传递的Token
     */
    public final static String MYDESK_TOKEN = Properties.mydeskurl;

    private final static String MYDESK = Properties.mydesk;

    /**
     * 接口调用测试 - 无参
     */
    public final static String TESTS = "http://api.comin.top/Com/Think/getPoetry";

    /**
     * 接口调用测试 - 有参
     */
    public final static String TEST_PARAM = "http://api.comin.top/Com/Think/getOldAlmanac";

    /**
     * VForm 登录
     */
    public final static String LOGIN = VFORM_IP + "/vform-service/user/login.htm";
    /**
     * VForm 插入
     */
    public final static String INSERT = VFORM_IP + "/vform-service/tgpms/insert.htm";
    /**
     * VForm 批量插入
     */
    public final static String INSERT_ALL = VFORM_IP + "/vform-service/tgpms/insert/batch.htm";
    /**
     * VForm 数据修改
     */
    public final static String UPDATE = VFORM_IP + "/vform-service/tgpms/update.htm";
    /**
     * VForm 数据批量修改
     */
    public final static String UPDATE_ALL = VFORM_IP + "/vform-service/tgpms/update/batch.htm";
    /**
     * VForm 数据删除
     */
    public final static String DELETE = VFORM_IP + "/vform-service/tgpms/delete.htm";
    /**
     * VForm  数据批量删除
     */
    public final static String DELETE_ALL = VFORM_IP + "/vform-service/tgpms/delete/batch.htm";
    /**
     * VForm 数据查询
     */
    public final static String QUERY = VFORM_IP + "/vform-service/tgpms/query.htm";
    /**
     * VForm  范围查询接口
     */
    public final static String QUERY_RANGE = VFORM_IP + "/vform-service/tgpms/queryRange.htm";
    /**
     * VForm 数据记录数查询
     */
    public final static String QUERY_TOTAL = VFORM_IP + "/vform-service/tgpms/queryTotal.htm";
    /**
     * VForm  范围记录数查询
     */
    public final static String QUERY_RANGETOTAL = VFORM_IP + "/vform-service/tgpms/queryRangeTotal.htm";
    /**
     * VForm 特殊查询接口
     */
    public final static String MULTIFORMSQUERY = VFORM_IP + "/vform-service/tgpms/multiformsquery.htm";
    /**
     * VForm 值列表分页查询接口
     */
    public final static String GETLOVPAGE = VFORM_IP + "/vform-service/tgpms/getlovpage.htm";
    /**
     * VForm 值列表查询接口
     */
    public final static String GETLOV = VFORM_IP + "/vform-service/tgpms/getlov.htm";
    /**
     * VForm 报表打印接口
     */
    public final static String RUNREPORT = VFORM_IP + "/vform-service/tgpms/runReport.htm";
    /**
     * VForm 旧报表打印接口
     */
    public final static String OLDRUNREPORT = VFORM_IP + "/vform-service/tgpms/runReportForOld.htm";

    /**
     * 通过手机获取用户信息
     */
    public final static String TGPMS_GET_USERINFO = MYDESK + "/notify/getUserTgpmsBymobile";

    /**
     * 门户集成获取token地址
     */
    public final static String PORTAL_TOKEN = PORTAL_URL + "/oauth2/getToken";
    /**
     * 门户集成获取token地址
     */
    public final static String PORTAL_USERINFO = PORTAL_URL + "/oauth2/getUserInfo";

}